<template>
  <div class="">
    <el-card class="box-card">
      <template>
        <el-table :data="RightsData" stripe style="width: 100%">
          <el-table-column type="index" width="50">
          </el-table-column>
          <el-table-column prop="authName" label="权限说明" width="220">
          </el-table-column>
          <el-table-column prop="path" label="对应访问路径" width="380">
          </el-table-column>
          <el-table-column prop="level" label="权限层级">
            <template slot-scope="scope">
              <el-tag v-if="scope.row.level==0" type="success">一级权限</el-tag>
              <el-tag v-else-if="scope.row.level==1" type="info">二级权限</el-tag>
              <el-tag v-else type="danger">三级权限</el-tag>
            </template>
          </el-table-column>
        </el-table>
      </template>
    </el-card>
  </div>
</template>

<script>
  export default {
    components: {},
    data() {
      return {
        RightsData: []
      }
    },
    created() {
      this.getRightsData()
    },
    mounted() {},
    watch: {},
    computed: {},
    methods: {
      getRightsData() {
        this.$axios.get('rights/list').then(val => {

          this.RightsData = val.data
        })

      }
    },
  }

</script>
<style lang="css" scoped>
</style>
